<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<!-- This file documents the use of the GNU compilers.

Copyright (C) 1988-2023 Free Software Foundation, Inc.

Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or
any later version published by the Free Software Foundation; with the
Invariant Sections being "Funding Free Software", the Front-Cover
Texts being (a) (see below), and with the Back-Cover Texts being (b)
(see below).  A copy of the license is included in the section entitled
"GNU Free Documentation License".

(a) The FSF's Front-Cover Text is:

A GNU Manual

(b) The FSF's Back-Cover Text is:

You have freedom to copy and modify this GNU Manual, like GNU
     software.  Copies published by the Free Software Foundation raise
     funds for GNU development. -->
<!-- Created by GNU Texinfo 6.5, http://www.gnu.org/software/texinfo/ -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>C-SKY Options (Using the GNU Compiler Collection (GCC))</title>

<meta name="description" content="C-SKY Options (Using the GNU Compiler Collection (GCC))">
<meta name="keywords" content="C-SKY Options (Using the GNU Compiler Collection (GCC))">
<meta name="resource-type" content="document">
<meta name="distribution" content="global">
<meta name="Generator" content="makeinfo">
<link href="index.html#Top" rel="start" title="Top">
<link href="Indices.html#Indices" rel="index" title="Indices">
<link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
<link href="Submodel-Options.html#Submodel-Options" rel="up" title="Submodel Options">
<link href="Darwin-Options.html#Darwin-Options" rel="next" title="Darwin Options">
<link href="CRIS-Options.html#CRIS-Options" rel="prev" title="CRIS Options">
<style type="text/css">
<!--
a.summary-letter {text-decoration: none}
blockquote.indentedblock {margin-right: 0em}
blockquote.smallindentedblock {margin-right: 0em; font-size: smaller}
blockquote.smallquotation {font-size: smaller}
div.display {margin-left: 3.2em}
div.example {margin-left: 3.2em}
div.lisp {margin-left: 3.2em}
div.smalldisplay {margin-left: 3.2em}
div.smallexample {margin-left: 3.2em}
div.smalllisp {margin-left: 3.2em}
kbd {font-style: oblique}
pre.display {font-family: inherit}
pre.format {font-family: inherit}
pre.menu-comment {font-family: serif}
pre.menu-preformatted {font-family: serif}
pre.smalldisplay {font-family: inherit; font-size: smaller}
pre.smallexample {font-size: smaller}
pre.smallformat {font-family: inherit; font-size: smaller}
pre.smalllisp {font-size: smaller}
span.nolinebreak {white-space: nowrap}
span.roman {font-family: initial; font-weight: normal}
span.sansserif {font-family: sans-serif; font-weight: normal}
ul.no-bullet {list-style: none}
-->
</style>


</head>

<body lang="en_US">
<a name="C_002dSKY-Options"></a>
<div class="header">
<p>
Next: <a href="Darwin-Options.html#Darwin-Options" accesskey="n" rel="next">Darwin Options</a>, Previous: <a href="CRIS-Options.html#CRIS-Options" accesskey="p" rel="prev">CRIS Options</a>, Up: <a href="Submodel-Options.html#Submodel-Options" accesskey="u" rel="up">Submodel Options</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Indices.html#Indices" title="Index" rel="index">Index</a>]</p>
</div>
<hr>
<a name="C_002dSKY-Options-1"></a>
<h4 class="subsection">3.19.10 C-SKY Options</h4>
<a name="index-C_002dSKY-Options"></a>

<p>GCC supports these options when compiling for C-SKY V2 processors.
</p>
<dl compact="compact">
<dd>
<a name="index-march_003d"></a>
</dd>
<dt><code>-march=<var>arch</var></code></dt>
<dd><p>Specify the C-SKY target architecture.  Valid values for <var>arch</var> are:
&lsquo;<samp>ck801</samp>&rsquo;, &lsquo;<samp>ck802</samp>&rsquo;, &lsquo;<samp>ck803</samp>&rsquo;, &lsquo;<samp>ck807</samp>&rsquo;, and &lsquo;<samp>ck810</samp>&rsquo;.
The default is &lsquo;<samp>ck810</samp>&rsquo;.
</p>
<a name="index-mcpu_003d-1"></a>
</dd>
<dt><code>-mcpu=<var>cpu</var></code></dt>
<dd><p>Specify the C-SKY target processor.  Valid values for <var>cpu</var> are:
&lsquo;<samp>ck801</samp>&rsquo;, &lsquo;<samp>ck801t</samp>&rsquo;,
&lsquo;<samp>ck802</samp>&rsquo;, &lsquo;<samp>ck802t</samp>&rsquo;, &lsquo;<samp>ck802j</samp>&rsquo;,
&lsquo;<samp>ck803</samp>&rsquo;, &lsquo;<samp>ck803h</samp>&rsquo;, &lsquo;<samp>ck803t</samp>&rsquo;, &lsquo;<samp>ck803ht</samp>&rsquo;,
&lsquo;<samp>ck803f</samp>&rsquo;, &lsquo;<samp>ck803fh</samp>&rsquo;, &lsquo;<samp>ck803e</samp>&rsquo;, &lsquo;<samp>ck803eh</samp>&rsquo;,
&lsquo;<samp>ck803et</samp>&rsquo;, &lsquo;<samp>ck803eht</samp>&rsquo;, &lsquo;<samp>ck803ef</samp>&rsquo;, &lsquo;<samp>ck803efh</samp>&rsquo;,
&lsquo;<samp>ck803ft</samp>&rsquo;, &lsquo;<samp>ck803eft</samp>&rsquo;, &lsquo;<samp>ck803efht</samp>&rsquo;, &lsquo;<samp>ck803r1</samp>&rsquo;,
&lsquo;<samp>ck803hr1</samp>&rsquo;, &lsquo;<samp>ck803tr1</samp>&rsquo;, &lsquo;<samp>ck803htr1</samp>&rsquo;, &lsquo;<samp>ck803fr1</samp>&rsquo;,
&lsquo;<samp>ck803fhr1</samp>&rsquo;, &lsquo;<samp>ck803er1</samp>&rsquo;, &lsquo;<samp>ck803ehr1</samp>&rsquo;, &lsquo;<samp>ck803etr1</samp>&rsquo;,
&lsquo;<samp>ck803ehtr1</samp>&rsquo;, &lsquo;<samp>ck803efr1</samp>&rsquo;, &lsquo;<samp>ck803efhr1</samp>&rsquo;, &lsquo;<samp>ck803ftr1</samp>&rsquo;,
&lsquo;<samp>ck803eftr1</samp>&rsquo;, &lsquo;<samp>ck803efhtr1</samp>&rsquo;,
&lsquo;<samp>ck803s</samp>&rsquo;, &lsquo;<samp>ck803st</samp>&rsquo;, &lsquo;<samp>ck803se</samp>&rsquo;, &lsquo;<samp>ck803sf</samp>&rsquo;,
&lsquo;<samp>ck803sef</samp>&rsquo;, &lsquo;<samp>ck803seft</samp>&rsquo;,
&lsquo;<samp>ck807e</samp>&rsquo;, &lsquo;<samp>ck807ef</samp>&rsquo;, &lsquo;<samp>ck807</samp>&rsquo;, &lsquo;<samp>ck807f</samp>&rsquo;,
&lsquo;<samp>ck810e</samp>&rsquo;, &lsquo;<samp>ck810et</samp>&rsquo;, &lsquo;<samp>ck810ef</samp>&rsquo;, &lsquo;<samp>ck810eft</samp>&rsquo;,
&lsquo;<samp>ck810</samp>&rsquo;, &lsquo;<samp>ck810v</samp>&rsquo;, &lsquo;<samp>ck810f</samp>&rsquo;, &lsquo;<samp>ck810t</samp>&rsquo;, &lsquo;<samp>ck810fv</samp>&rsquo;,
&lsquo;<samp>ck810tv</samp>&rsquo;, &lsquo;<samp>ck810ft</samp>&rsquo;, and &lsquo;<samp>ck810ftv</samp>&rsquo;.
</p>
<a name="index-mbig_002dendian-4"></a>
<a name="index-EB-1"></a>
<a name="index-mlittle_002dendian-4"></a>
<a name="index-EL-1"></a>
</dd>
<dt><code>-mbig-endian</code></dt>
<dt><code>-EB</code></dt>
<dt><code>-mlittle-endian</code></dt>
<dt><code>-EL</code></dt>
<dd>
<p>Select big- or little-endian code.  The default is little-endian.
</p>
<a name="index-mfloat_002dabi-1"></a>
</dd>
<dt><code>-mfloat-abi=<var>name</var></code></dt>
<dd><p>Specifies which floating-point ABI to use.  Permissible values
are: &lsquo;<samp>soft</samp>&rsquo;, &lsquo;<samp>softfp</samp>&rsquo; and &lsquo;<samp>hard</samp>&rsquo;.
</p>
<p>Specifying &lsquo;<samp>soft</samp>&rsquo; causes GCC to generate output containing
library calls for floating-point operations.
&lsquo;<samp>softfp</samp>&rsquo; allows the generation of code using hardware floating-point
instructions, but still uses the soft-float calling conventions.
&lsquo;<samp>hard</samp>&rsquo; allows generation of floating-point instructions
and uses FPU-specific calling conventions.
</p>
<p>The default depends on the specific target configuration.  Note that
the hard-float and soft-float ABIs are not link-compatible; you must
compile your entire program with the same ABI, and link with a
compatible set of libraries.
</p>
<a name="index-mhard_002dfloat"></a>
<a name="index-msoft_002dfloat-1"></a>
</dd>
<dt><code>-mhard-float</code></dt>
<dt><code>-msoft-float</code></dt>
<dd>
<p>Select hardware or software floating-point implementations.
The default is soft float.
</p>
<a name="index-mdouble_002dfloat"></a>
</dd>
<dt><code>-mdouble-float</code></dt>
<dt><code>-mno-double-float</code></dt>
<dd><p>When <samp>-mhard-float</samp> is in effect, enable generation of
double-precision float instructions.  This is the default except
when compiling for CK803.
</p>
<a name="index-mfdivdu"></a>
</dd>
<dt><code>-mfdivdu</code></dt>
<dt><code>-mno-fdivdu</code></dt>
<dd><p>When <samp>-mhard-float</samp> is in effect, enable generation of
<code>frecipd</code>, <code>fsqrtd</code>, and <code>fdivd</code> instructions.
This is the default except when compiling for CK803.
</p>
<a name="index-mfpu_003d"></a>
</dd>
<dt><code>-mfpu=<var>fpu</var></code></dt>
<dd><p>Select the floating-point processor.  This option can only be used with
<samp>-mhard-float</samp>.
Values for <var>fpu</var> are
&lsquo;<samp>fpv2_sf</samp>&rsquo; (equivalent to &lsquo;<samp>-mno-double-float -mno-fdivdu</samp>&rsquo;),
&lsquo;<samp>fpv2</samp>&rsquo; (&lsquo;<samp>-mdouble-float -mno-divdu</samp>&rsquo;), and
&lsquo;<samp>fpv2_divd</samp>&rsquo; (&lsquo;<samp>-mdouble-float -mdivdu</samp>&rsquo;).
</p>
<a name="index-melrw"></a>
</dd>
<dt><code>-melrw</code></dt>
<dt><code>-mno-elrw</code></dt>
<dd><p>Enable the extended <code>lrw</code> instruction.  This option defaults to on
for CK801 and off otherwise.
</p>
<a name="index-mistack"></a>
</dd>
<dt><code>-mistack</code></dt>
<dt><code>-mno-istack</code></dt>
<dd><p>Enable interrupt stack instructions; the default is off.
</p>
<p>The <samp>-mistack</samp> option is required to handle the
<code>interrupt</code> and <code>isr</code> function attributes
(see <a href="C_002dSKY-Function-Attributes.html#C_002dSKY-Function-Attributes">C-SKY Function Attributes</a>).
</p>
<a name="index-mmp"></a>
</dd>
<dt><code>-mmp</code></dt>
<dd><p>Enable multiprocessor instructions; the default is off.
</p>
<a name="index-mcp"></a>
</dd>
<dt><code>-mcp</code></dt>
<dd><p>Enable coprocessor instructions; the default is off.
</p>
<a name="index-mcache"></a>
</dd>
<dt><code>-mcache</code></dt>
<dd><p>Enable coprocessor instructions; the default is off.
</p>
<a name="index-msecurity"></a>
</dd>
<dt><code>-msecurity</code></dt>
<dd><p>Enable C-SKY security instructions; the default is off.
</p>
<a name="index-mtrust"></a>
</dd>
<dt><code>-mtrust</code></dt>
<dd><p>Enable C-SKY trust instructions; the default is off.
</p>
<a name="index-mdsp"></a>
<a name="index-medsp"></a>
<a name="index-mvdsp"></a>
</dd>
<dt><code>-mdsp</code></dt>
<dt><code>-medsp</code></dt>
<dt><code>-mvdsp</code></dt>
<dd><p>Enable C-SKY DSP, Enhanced DSP, or Vector DSP instructions, respectively.
All of these options default to off.
</p>
<a name="index-mdiv"></a>
</dd>
<dt><code>-mdiv</code></dt>
<dt><code>-mno-div</code></dt>
<dd><p>Generate divide instructions.  Default is off.
</p>
<a name="index-msmart"></a>
</dd>
<dt><code>-msmart</code></dt>
<dt><code>-mno-smart</code></dt>
<dd><p>Generate code for Smart Mode, using only registers numbered 0-7 to allow
use of 16-bit instructions.  This option is ignored for CK801 where this
is the required behavior, and it defaults to on for CK802.
For other targets, the default is off.
</p>
<a name="index-mhigh_002dregisters"></a>
</dd>
<dt><code>-mhigh-registers</code></dt>
<dt><code>-mno-high-registers</code></dt>
<dd><p>Generate code using the high registers numbered 16-31.  This option
is not supported on CK801, CK802, or CK803, and is enabled by default
for other processors.
</p>
<a name="index-manchor"></a>
</dd>
<dt><code>-manchor</code></dt>
<dt><code>-mno-anchor</code></dt>
<dd><p>Generate code using global anchor symbol addresses.
</p>
<a name="index-mpushpop"></a>
</dd>
<dt><code>-mpushpop</code></dt>
<dt><code>-mno-pushpop</code></dt>
<dd><p>Generate code using <code>push</code> and <code>pop</code> instructions.  This option
defaults to on.
</p>
<a name="index-mmultiple_002dstld"></a>
</dd>
<dt><code>-mmultiple-stld</code></dt>
<dt><code>-mstm</code></dt>
<dt><code>-mno-multiple-stld</code></dt>
<dt><code>-mno-stm</code></dt>
<dd><p>Generate code using <code>stm</code> and <code>ldm</code> instructions.  This option
isn&rsquo;t supported on CK801 but is enabled by default on other processors.
</p>
<a name="index-mconstpool"></a>
</dd>
<dt><code>-mconstpool</code></dt>
<dt><code>-mno-constpool</code></dt>
<dd><p>Create constant pools in the compiler instead of deferring it to the
assembler.  This option is the default and required for correct code
generation on CK801 and CK802, and is optional on other processors.
</p>
<a name="index-mstack_002dsize-1"></a>
</dd>
<dt><code>-mstack-size</code></dt>
<dt><code>-mno-stack-size</code></dt>
<dd><p>Emit <code>.stack_size</code> directives for each function in the assembly
output.  This option defaults to off.
</p>
<a name="index-mccrt"></a>
</dd>
<dt><code>-mccrt</code></dt>
<dt><code>-mno-ccrt</code></dt>
<dd><p>Generate code for the C-SKY compiler runtime instead of libgcc.  This
option defaults to off.
</p>
<a name="index-mbranch_002dcost_003d"></a>
</dd>
<dt><code>-mbranch-cost=<var>n</var></code></dt>
<dd><p>Set the branch costs to roughly <code>n</code> instructions.  The default is 1.
</p>
<a name="index-msched_002dprolog-1"></a>
</dd>
<dt><code>-msched-prolog</code></dt>
<dt><code>-mno-sched-prolog</code></dt>
<dd><p>Permit scheduling of function prologue and epilogue sequences.  Using
this option can result in code that is not compliant with the C-SKY V2 ABI
prologue requirements and that cannot be debugged or backtraced.
It is disabled by default.
</p>
<a name="index-msim-2"></a>
</dd>
<dt><code>-msim</code></dt>
<dd><p>Links the library libsemi.a which is in compatible with simulator. Applicable
to ELF compiler only.
</p>
</dd>
</dl>

<hr>
<div class="header">
<p>
Next: <a href="Darwin-Options.html#Darwin-Options" accesskey="n" rel="next">Darwin Options</a>, Previous: <a href="CRIS-Options.html#CRIS-Options" accesskey="p" rel="prev">CRIS Options</a>, Up: <a href="Submodel-Options.html#Submodel-Options" accesskey="u" rel="up">Submodel Options</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Indices.html#Indices" title="Index" rel="index">Index</a>]</p>
</div>



</body>
</html>
